Skip to content

refactor: reorder power mode options in performance controller#311

Merged
deepin-bot[bot] merged 1 commit into
linuxdeepin:masterfrom
mhduiy:power
May 13, 2025
Merged

refactor: reorder power mode options in performance controller#311
deepin-bot[bot] merged 1 commit into
linuxdeepin:masterfrom
mhduiy:power

Conversation

@mhduiy

@mhduiy mhduiy commented May 13, 2025

Copy link
Copy Markdown
Contributor
  1. Changed the order of power mode options in PerformanceModeController
  2. Now shows High Performance first, followed by Balance Performance and Balanced mode
  3. Matching property map was also reordered to maintain consistency
  4. This change likely reflects a new priority order for power modes where performance is emphasized

refactor: 性能控制器中电源模式选项重新排序

  1. 修改了PerformanceModeController中电源模式选项的顺序
  2. 现在首先显示高性能模式,然后是平衡性能和平衡模式
  3. 匹配的属性映射也重新排序以保持一致性
  4. 此变更可能反映了电源模式的新优先级顺序,其中性能被强调

pms: BUG-271001

Summary by Sourcery

Enhancements:

  • Adjust power mode list and corresponding property map order to prioritize High Performance over Balance Performance and Balanced

1. Changed the order of power mode options in PerformanceModeController
2. Now shows High Performance first, followed by Balance Performance and
Balanced mode
3. Matching property map was also reordered to maintain consistency
4. This change likely reflects a new priority order for power modes
where performance is emphasized

refactor: 性能控制器中电源模式选项重新排序

1. 修改了PerformanceModeController中电源模式选项的顺序
2. 现在首先显示高性能模式,然后是平衡性能和平衡模式
3. 匹配的属性映射也重新排序以保持一致性
4. 此变更可能反映了电源模式的新优先级顺序,其中性能被强调

pms: BUG-271001
@mhduiy mhduiy requested a review from 18202781743 May 13, 2025 09:22
@sourcery-ai

sourcery-ai Bot commented May 13, 2025

Copy link
Copy Markdown

Reviewer's Guide

Refactors PerformanceModeController to reprioritize power mode options, displaying and mapping them in the order: High Performance, Balance Performance, Balanced, then Power Saver.

Class Diagram: PerformanceModeController Power Mode Configuration Update

classDiagram
  class PerformanceModeController {
    +PerformanceModeController()
    #_initializePowerModeData()
  }
  note for PerformanceModeController "The order of elements within internal data structures for power modes has been updated:\n\n  powerModeList (QList<QPair<QString, QString>>), which dictates UI display order:\n  - Previous order: Balanced, Balance Performance, High Performance, Power Saver.
  - New order: High Performance, Balance Performance, Balanced, Power Saver.\n\n  powerModeProperty (QMap<QString, QString>), a map of modes to their support property names:\n  - Order of entries also realigned to match powerModeList for consistency."
Loading

File-Level Changes

Change Details Files
Reorder power mode options to emphasize performance
  • Reordered powerModeList entries: High Performance, Balance Performance, Balanced, Power Saver
  • Updated powerModeProperty map to mirror the new display sequence
plugins/dde-dock/power/performancemodecontroller.h

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @mhduiy - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: 18202781743, mhduiy

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@mhduiy

mhduiy commented May 13, 2025

Copy link
Copy Markdown
Contributor Author

/forcemerge

@deepin-bot

deepin-bot Bot commented May 13, 2025

Copy link
Copy Markdown

This pr force merged! (status: blocked)

@deepin-bot deepin-bot Bot merged commit e303c49 into linuxdeepin:master May 13, 2025
7 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants